<template>
<div class="leftBook">
  <div class="title">库存记录:</div>
  <div class="my_top1">
    <div class="item">
      <span>标题：</span>
      <input type="text" placeholder="请输入" />
    </div>
    <div class="item">
      <span>图书名称: </span>
      <el-select v-model="value" placeholder="请选择">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
        </el-option>
      </el-select>
    </div>
    <div class="search">搜索</div>
    <div class="cz">重置</div>
    <div class="ck" @click="clickBox">出库</div>
  </div>
  <div class="table">
    <el-table :data="tableData" stripe style="width: 95%" :header-cell-style="{ background: '#F3E3E4', fontSize: '10px' }">
      <el-table-column prop="book" label="标题" width="120">
      </el-table-column>
      <el-table-column prop="author" label="作者"> </el-table-column>
      <el-table-column prop="surplus" label="库存数量" width="100">
      </el-table-column>
      <el-table-column prop="gross" label="出库时间" width="90">
      </el-table-column>
      <el-table-column prop="gross" label="操作"> </el-table-column>
    </el-table>
  </div>
  <el-dialog title="新增出库单" :visible.sync="centerDialogVisible" width="371px" center top="350px" >
    <div class="bookList_top">
      <div class="item">
        <span>书号：</span><input v-model="input" placeholder="请输入书号" />
      </div>
      <div class="item">
        <span>书号：</span><input v-model="input" placeholder="请输入书号" />
      </div>
      <div class="item">
        <span>版次: </span><input v-model="input" placeholder="请输入书号" />
      </div>
      <div class="item">
        <span>版本: </span><input v-model="input" placeholder="请输入书号" />
      </div>
      <div class="item">
        <span>学科: </span><input v-model="input" placeholder="请输入书号" />
      </div>
      <div class="item">
        <span>专业: </span>
        <input v-model="input" placeholder="请输入书号" />
      </div>
      <div class="item">
        <span style="margin-left: -30px">是否出版: </span><input v-model="input" placeholder="请输入书号" />
      </div>
      <div class="item">
        <span>数量: </span><input v-model="input" placeholder="请输入书号" />
      </div>
    </div>
    <span slot="footer" class="dialog-footer">
      <div class="cz" @click="centerDialogVisible = false">取消</div>
      <div class="search" @click="centerDialogVisible = false">
        提交
      </div>
    </span>
  </el-dialog>
</div>
</template>

<script>
export default {
  data() {
    return {
      options: [{
          value: '选项1',
          label: '黄金糕'
        },
        {
          value: '选项2',
          label: '双皮奶'
        }
      ],
      value: '',
      centerDialogVisible: false,
      tableData: [{
          book: '454361545556',
          name: '书海五位',
          author: '郭德纲',
          surplus: '9',
          gross: '20'
        },
        {
          book: '454361545556',
          name: '书海五位',
          author: '郭德纲',
          surplus: '9',
          gross: '删除'
        }
      ],
      input: ''
    }
  },
  methods: {
    clickBox() {
      this.centerDialogVisible = true
    }
  }
}
</script>

<style lang="scss" scoped>
/deep/.el-dialog__title {
  color: #950006;
  font-weight: 600;
}

.leftBook {
  .title {
    height: 50px;
    line-height: 50px;
    padding-left: 20px;

    font-size: 14px;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #000000;
  }
}

.item {
  display: flex;
  align-items: center;

  input {
    width: 78px;
    height: 24px;
  }
}

.my_top1 {
  display: flex;
  align-items: center;
  padding-left: 20px;
  font-size: 12px;

  .item {
    span {
      display: block;
    }

    input {
      width: 60px;
      margin-right: 4px;
    }
  }

  .ck {
    width: 45px;
    font-size: 14px;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
    line-height: 26px;
    text-align: center;
    height: 30px;
    background: #960006;
    border: 1px solid #8a8a8a;
    border-radius: 13px;
    margin-left: 5px;
  }
}

.search {
  width: 84px;
  height: 30px;
  background: #f3e3e4;
  border: 1px solid #8a8a8a;
  border-radius: 14px;
  text-align: center;
  line-height: 28px;
  margin: 0 5px;
  font-size: 14px;
  font-family: Adobe Heiti Std;
  font-weight: normal;
  color: #000000;
}

.cz {
  width: 84px;
  height: 30px;
  background: #960006;
  border: 1px solid #8a8a8a;
  border-radius: 14px;
  text-align: center;
  line-height: 28px;
  font-size: 14px;
  font-family: Adobe Heiti Std;
  font-weight: normal;
  color: #ffffff;
}

.table {
  margin-top: 18px;
  padding-left: 10px;
}

.dialog-footer {
  width: 200px;
  display: flex;
  margin: 0 auto;
}

.bookList_top {
  display: flex;
  flex-direction: column;
  align-items: center;

  .item {
    width: 90%;
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    align-items: center;

    input {
      width: 70%;
    }

    span {
      color: #960006;
      display: inline-block;
      text-anchor: start;
    }
  }
}

/deep/ .el-input__inner {
  width: 100px;
  height: 30px;
  font-size: 10px;
}

/deep/ .el-input__icon {
  line-height: none;
}
</style>
